using System;
using System.Collections.Generic;
using System.Text;
using System.Linq;
using SimpleServiceBus.Bus;
using Apache.NMS;
using SimpleServiceBus.Bus.MessageManagement;
using System.Xml.Serialization;

namespace SimpleServiceBus.Endpoints.ActiveMQ.Transport {

    public class ActiveMQMessageEnvelope: MessageEnvelope {

        //-----< Fields >-----
        //----------------------------------------------------------------------------------        


        //-----< Constructors >-----
        //----------------------------------------------------------------------------------        


        //-----< Public and protected properties >-----
        //----------------------------------------------------------------------------------        

        /// <summary>
        /// Specifies if the message beeing sent contains a Byte array to send as an ActiveMQ bytes message, and set the ActiveMQ message properties from the message properties.
        /// </summary>
        [XmlIgnore]
        public Boolean BytesMessage { get; set; }

        /// <summary>
        /// When serializing messages using XML, it is better to output them in the TextPayload instead of the Payload(byte[]), in order to avoid the byte to string conversions.
        /// </summary>
        [XmlIgnore]
        public String TextPayload { get; set; }

        /// <summary>
        /// Gets the received message from the ActiveMQ broker.
        /// </summary>
        [XmlIgnore]
        public IMessage TransportMessage { get; set; }
        
        /// <summary>
        /// Gets or sets the exception that occurred while processing a received message. This will allow the transport to rollback the session.
        /// </summary>
        [XmlIgnore]
        public MessageProcessingException ProcessingException { get; set; }

        //-----< Public and protected methods >-----
        //----------------------------------------------------------------------------------        


        //-----< Events >-----
        //----------------------------------------------------------------------------------        


        //-----< Internal members >-----
        //----------------------------------------------------------------------------------        


        //-----< Private members >-----
        //----------------------------------------------------------------------------------        


        //-----< All nested types >-----
        //----------------------------------------------------------------------------------        


        //-----< All explicit interface implementations >-----
        //----------------------------------------------------------------------------------        


    }
}

